# 作者：hashaki
import tensorflow as tf
a=tf.Variable(1.0,name='a')
loss=a-1
opt=tf.train.GradientDescentOptimizer(0.1)
g=tf.get_default_graph()
grad=opt.compute_gradients(loss)
train_op=opt.apply_gradients(grad)
